home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1992 June: ROMin Holiday / ADC Developer CD (1992-06) (''ROMin Holiday'')_iso / Developer Connection - 06-1992.iso / Development Platforms / Apple II / Essentials / MPW IIGS Interfaces / CIIGSIncludes / TextTool.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-04-03  |  3.8 KB  |  94 lines  |  [TEXT/MPS ]

  1. /********************************************
  2. ; File: TextTool.h
  3. ;
  4. ;
  5. ; Copyright Apple Computer, Inc.1986-90
  6. ; All Rights Reserved
  7. ;
  8. ********************************************/
  9. #ifndef __TYPES__
  10. #include <TYPES.h>
  11. #endif
  12.  
  13. #ifndef __TEXTTOOL__
  14. #define __TEXTTOOL__
  15.  
  16.  
  17. /* Error Codes */
  18. #define badDevType 0x0C01  /* not implemented */
  19. #define badDevNum 0x0C02  /* Illegal device number. */
  20. #define badMode 0x0C03  /* Bad mode: illegal operation. */
  21. #define unDefHW 0x0C04  /* Undefined hardware error */
  22. #define lostDev 0x0C05  /* Lost device: Device no longer on line */
  23. #define lostFile 0x0C06  /* File no longer in diskette directory */
  24. #define badTitle 0x0C07  /* Illegal Filename */
  25. #define noRoom 0x0C08  /* Insufficient space on specified diskette */
  26. #define noDevice 0x0C09  /* Volume not online */
  27. #define noFile 0x0C0A  /* File not in specifiled directory */
  28. #define dupFile 0x0C0B  /* Filename already exists */
  29. #define notClosed 0x0C0C  /* Attempt to open an open file */
  30. #define notOpen 0x0C0D  /* Attempt to close closed file */
  31. #define badFormat 0x0C0E  /* error reading real or integer */
  32. #define ringBuffOFlo 0x0C0F  /* Chars arriving too fast */
  33. #define writeProtected 0x0C10
  34. #define devErr 0x0C40  /* Read or Write failed */
  35.  
  36. /* deviceNum Codes */
  37. #define input 0x0000
  38. #define output 0x0001
  39. #define errorOutput 0x0002
  40.  
  41. /* deviceType Codes */
  42. #define basicType 0x0000
  43. #define pascalType 0x0001
  44. #define ramBased 0x0002
  45.  
  46. /* echoFlag Codes */
  47. #define noEcho 0x0000
  48. #define echo 0x0001
  49. struct DeviceRec {
  50.    LongWord ptrOrSlot; /* slot number or jump table ptr */
  51.    Word deviceType; /* type of input device */
  52. } ;
  53. typedef struct DeviceRec DeviceRec, *DeviceRecPtr, **DeviceRecHndl;
  54. struct TxtMaskRec {
  55.    Word orMask; /*  */
  56.    Word andMask; /*  */
  57. } ;
  58. typedef struct TxtMaskRec TxtMaskRec, *TxtMaskRecPtr, **TxtMaskRecHndl;
  59. extern pascal void CtlTextDev() inline(0x160C,dispatcher);
  60. extern pascal void ErrWriteBlock() inline(0x1F0C,dispatcher);
  61. extern pascal void ErrWriteChar() inline(0x190C,dispatcher);
  62. extern pascal void ErrWriteCString() inline(0x210C,dispatcher);
  63. extern pascal void ErrWriteLine() inline(0x1B0C,dispatcher);
  64. extern pascal void ErrWriteString() inline(0x1D0C,dispatcher);
  65. extern pascal TxtMaskRec GetErrGlobals() inline(0x0E0C,dispatcher);
  66. extern DeviceRec GetErrorDevice();
  67. extern pascal TxtMaskRec GetInGlobals() inline(0x0C0C,dispatcher);
  68. extern DeviceRec GetInputDevice();
  69. extern pascal TxtMaskRec GetOutGlobals () inline(0x0D0C,dispatcher);
  70. extern DeviceRec GetOutputDevice();
  71. extern pascal void InitTextDev() inline(0x150C,dispatcher);
  72. extern pascal Word ReadChar() inline(0x220C,dispatcher);
  73. extern pascal Word ReadLine() inline(0x240C,dispatcher);
  74. extern pascal void SetErrGlobals() inline(0x0B0C,dispatcher);
  75. extern pascal void SetErrorDevice() inline(0x110C,dispatcher);
  76. extern pascal void SetInGlobals() inline(0x090C,dispatcher);
  77. extern pascal void SetInputDevice() inline(0x0F0C,dispatcher);
  78. extern pascal void SetOutGlobals() inline(0x0A0C,dispatcher);
  79. extern pascal void SetOutputDevice() inline(0x100C,dispatcher);
  80. extern pascal void StatusTextDev() inline(0x170C,dispatcher);
  81. extern pascal void TextBootInit() inline(0x010C,dispatcher);
  82. extern pascal void TextReadBlock() inline(0x230C,dispatcher);
  83. extern pascal void TextReset() inline(0x050C,dispatcher);
  84. extern pascal void TextShutDown() inline(0x030C,dispatcher);
  85. extern pascal void TextStartUp() inline(0x020C,dispatcher);
  86. extern pascal Boolean TextStatus() inline(0x060C,dispatcher);
  87. extern pascal Word TextVersion() inline(0x040C,dispatcher);
  88. extern pascal void TextWriteBlock() inline(0x1E0C,dispatcher);
  89. extern pascal void WriteChar() inline(0x180C,dispatcher);
  90. extern pascal void WriteCString() inline(0x200C,dispatcher);
  91. extern pascal void WriteLine() inline(0x1A0C,dispatcher);
  92. extern pascal void WriteString() inline(0x1C0C,dispatcher);
  93. #endif
  94.